package com.czx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.czx.common.utils.TimeUtils;
import lombok.Data;

import java.util.Date;

@Data
public class Comment {

  @TableId(type = IdType.AUTO)

  private Integer id;
  private Integer userId;  //作者id
  private Integer entityType;  //帖子类型
  private Integer entityId;  //帖子id
  private Integer targetId;   //评论人id
  private String content;  //内容
  private Integer status;  //状态
  private Date createTime;  //创建时间
  private String targetName; //评论人名字
  @TableField(exist = false)
  private String post;


  public String getPost() {
    return TimeUtils.format(getCreateTime());
  }

  public void setPost(String post) {
    this.post = post;
  }
}
